#ifndef __sk6812_SIP_H
#define __sk6812_SIP_H

#ifdef __cplusplus
extern "C"
{
#endif

#include "main.h"

#define sk6812_NUM_LEDS 10
#define sk6812_SPI_HANDLE Spi1Handle

#define sk6812_RESET_PULSE 60
#define sk6812_BUFFER_SIZE (sk6812_NUM_LEDS * 32 + sk6812_RESET_PULSE)

#define sk6812_SPI_TxRxByte(__DATA__) SPI_TxRxByte(__DATA__)

    extern SPI_HandleTypeDef Spi1Handle;
    extern uint8_t sk6812_buffer[];

    void sk6812_init(void);
    void sk6812_send_spi(void);
    void sk6812_pixel(uint16_t led_no, uint8_t r, uint8_t g, uint8_t b, uint8_t w);
    void sk6812_pixel_all(uint8_t r, uint8_t g, uint8_t b, uint8_t w);

#ifdef __cplusplus
}
#endif

#endif /* __sk6812_SIP_H */

